Program Inversion for Tail Recursive Functions

نویسندگان

  • Naoki Nishida
  • Germán Vidal
چکیده

Program inversion is a fundamental problem that has been addressed in many different programming settings and applications. In the context of term rewriting, several methods already exist for computing the inverse of an injective function. These methods, however, usually return non-terminating inverted functions when the considered function is tail recursive. In this paper, we propose a direct and intuitive approach to the inversion of tail recursive functions. Our new technique is able to produce good results even without the use of an additional post-processing of determinization or completion. Moreover, when combined with a traditional approach to program inversion, it constitutes a promising approach to define a general method for program inversion. Our experimental results confirm that the new technique compares well with previous approaches. 1998 ACM Subject Classification F.4.2 Grammars and Other Rewriting Systems

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Conversion to tail recursion in term rewriting

Tail recursive functions are a special kind of recursive functions where the last action in their body is the recursive call. Tail recursion is important for a number of reasons (e.g., they are usually more efficient). In this article, we introduce an automatic transformation of first-order functions into tail recursive form. Functions are defined using a (first-order) term rewrite system. We p...

متن کامل

Executing Higher Order Logic

We report on the design of a prototyping component for the theorem prover Isabelle/HOL. Specifications consisting of datatypes, recursive functions and inductive definitions are compiled into a functional program. Functions and inductively defined relations can be mixed. Inductive definitions must be such that they can be executed in Prolog style but requiring only matching rather than unificat...

متن کامل

Steps Toward Mechanizing Program Transformations Using PVS

PVS is a highly automated framework for speciication and veriication. We show how the language and deduction features of PVS can be used to formalize, mechanize , and apply some useful program transformation techniques. We examine two such examples in detail. The rst is a fusion theorem due to Bird where the composition of a catamorphism (a recursive operation on the structure of a datatype) an...

متن کامل

Steps towards Mechanizing Program Transformations Using Pvs ?

PVS is a highly automated framework for speciication and veriication. We show how the language and deduction features of PVS can be used to formalize, mechanize , and apply some useful program transformation techniques. We examine two such examples in detail. The rst is a fusion theorem due to Bird where the composition of a catamorphism (a recursive operation on the structure of a datatype) an...

متن کامل

BC-ε: A Recursion-Theoretic Characterization of LOGSPACE

We present BC ε which is a function algebra that is sound and complete for LOGSPACE. It is based on the novel recursion-theoretic principle of generalized recursion where the step length of primitive recursion can be varied at each step. This allows elegant representations of functions like logarithm and division. Unlike characterizations found in the literature, it is noticeable that there doe...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011